/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-06-08 21:32:32
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-06-09 17:00:40
 * @FilePath: \vue3_admin_template\project\src\api\acl\user\type.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//账号信息返回结果ts类型
export interface Response {
  code: number
  message: string
  ok: boolean
}
//代表一个账号的信息ts类型
export interface User {
  id?: number
  createTime?: string
  updateTime?: string
  username?: string
  password?: string
  name?: string
  phone?: null
  roleName?: string
}
//数组包含全部用户信息
export type Records = User[]
//获取全部用户信息接口返回的数ts类型
export interface UserResponseData extends Response {
  data: {
    records: Records
    total: number
    size: number
    current: number
    pages: number
  }
}

//代表一个职位的ts类型
export interface RoleData {
  id?: number
  createTime?: string
  updateTime?: string
  roleName: string
  remark: null
}
//全部职位的列表
export type AllRole = RoleData[]
//获取全部职位的接口
export interface AllRoleResponseData extends Response {
  data: {
    assignRoles: AllRole
    allRolesList: AllRole
  }
}

//给用户分配职位接口携带参数
export interface SetRoleData {
  roleIdList: number[]
  userId: number
}
